From 2794096b6cf518c98b9e688da460660b17480106 Mon Sep 17 00:00:00 2001 From: "Mr. E23" Date: Tue, 27 Jan 2004 15:14:57 +0000 Subject: [PATCH] Minor speed improvement on list of long/short pages --- includes/SpecialLongpages.php | 4 ++-- includes/SpecialShortpages.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/SpecialLongpages.php b/includes/SpecialLongpages.php index e4c0ed7999..567f9a6b7f 100644 --- a/includes/SpecialLongpages.php +++ b/includes/SpecialLongpages.php @@ -14,8 +14,8 @@ class LongPagesPage extends QueryPage { function getSQL( $offset, $limit ) { return "SELECT cur_title, LENGTH(cur_text) AS len FROM cur " . - "WHERE cur_namespace=0 AND cur_is_redirect=0 ORDER BY " . - "LENGTH(cur_text) DESC LIMIT {$offset}, {$limit}"; + "WHERE cur_namespace=0 AND cur_is_redirect=0 ORDER BY len DESC " . + "LIMIT {$offset}, {$limit}"; } function formatResult( $skin, $result ) { diff --git a/includes/SpecialShortpages.php b/includes/SpecialShortpages.php index c68e072c0a..a34bb3605a 100644 --- a/includes/SpecialShortpages.php +++ b/includes/SpecialShortpages.php @@ -14,8 +14,8 @@ class ShortPagesPage extends QueryPage { function getSQL( $offset, $limit ) { return "SELECT cur_title, LENGTH(cur_text) AS len FROM cur " . - "WHERE cur_namespace=0 AND cur_is_redirect=0 ORDER BY " . - "LENGTH(cur_text) LIMIT {$offset}, {$limit}"; + "WHERE cur_namespace=0 AND cur_is_redirect=0 ORDER BY len " . + "LIMIT {$offset}, {$limit}"; } function formatResult( $skin, $result ) { -- 2.20.1